package com.lanswon.icc.auth.handle;

import com.lanswon.icc.common.security.handle.AbstractAuthenticationSuccessEventHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

/**
 * @ClassName AuthenticationSuccessEventHandler
 * @Description
 * @Author
 * @Date 2019/10/28 15:37
 * @Version V1.0
 **/
@Slf4j
@Component
public class AuthenticationSuccessEventHandler extends AbstractAuthenticationSuccessEventHandler {

//    @Autowired
//    ErrorLoginService errorLoginService;
//
//    @Autowired
//    LogService logService;

    @Override
    public void handle(Authentication authentication) {
        log.info("用户登录成功,信息如下：");
        log.info("{}", authentication.getPrincipal());
//
//        //登陆成功 处理业务
//        errorLoginService.suceesLoginDelKey();
//
//
//        logService.saveAuthLoginLog(String.format(MsgTemplate.OK_LOGIN_MSG,((User)authentication.getPrincipal()).getUsername()),LogConstant.LOG_LEVEL_INFO);
//



    }
}